*******************************************************************************************
*******************************************************************************************
******************** Reclassification Risk in the Small Group Health Insurance Market
******************* by Sebastian Fleitas, Gautam Gowrisankaran and Anthony Lo Sasso 
*******************************************************************************************
*******************************************************************************************
*******************************************************************************************
******************** Table D3
*******************************************************************************************
*******************************************************************************************
*******************************************************************************************


******************************************************************************************************************************************* fragment
****** LOAD DATABASE
clear all
set more off
set matsize 11000
cd "~/Dropbox/ReclassificationRisk/data_stata"

use database_firm_level.dta, replace 

**********************************************************************

egen firm = group(customer_number) 

*********************************************************************************************
reghdfe in_network_oopm     mean_pred_riskscore_rp prob_leaving* yeardum* , absorb(mbr_sys_id) cluster(customer_number year )
eststo mod1
reghdfe coinsurance            mean_pred_riskscore_rp prob_leaving* yeardum* , absorb(mbr_sys_id) cluster(customer_number year ) 
eststo mod2
reghdfe in_network_deductible  mean_pred_riskscore_rp prob_leaving* yeardum* , absorb(mbr_sys_id) cluster(customer_number year )
eststo mod3
****************************************************************************************************************** fragment

exit

